﻿Public Class ThongKeSachTheoTheLoai

    Private Sub btnshowreport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshowreport.Click
        Dim rpt As New rptthongketheloaisach
        Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
        Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
        For Each tbCurrent In rpt.Database.Tables
            tliCurrent = tbCurrent.LogOnInfo
            With tliCurrent.ConnectionInfo
                .ServerName = Application.StartupPath + "\QUANLYTHUVIEN.accdb"
            End With
            tbCurrent.ApplyLogOnInfo(tliCurrent)


        Next tbCurrent

        rpt.SetParameterValue("Reporter", "Nguyễn Sy Luan")
        CrystalReportViewerThongKeSachTheoTheLoai.ReportSource = rpt
    End Sub
End Class